<?php
echo $this->renderPartial("leftnav", array("arr_category"=>$arr_category));
?>

<div class="grid_712">
    <?php 
    foreach ($arr_productsByCategory as $items)
    {
        if ( count($items["arrProduct"]) > 0 )
        {
    ?>
        <div class="box">
            <h1><?=$items["categoryName"];?></h1>

            <div class="galleries_item">
                <?php
                $itemp = 0;
                foreach ($items["arrProduct"] as $o_product )
                {
                    if ($o_product instanceof Product )
                    {
                ?>
                    <div class = "item_vertical">
                        <a href="<?=Yii::app()->createAbsoluteUrl( "product/detail",
                                                                   array( "urlMapping" => $o_product->url_mapping, 
                                                                          "key"        => $o_product->identification
                                                                        )
                                                                 );?>">
                            <img alt = "album" src = "<?=$o_product->image;?>" />
                        </a>

                        <div class="item_content border_radius_all">
                            <a href="<?=Yii::app()->createAbsoluteUrl( "article/detail",
                                                                       array( "urlMapping" => $o_product->url_mapping, 
                                                                              "key"        => $o_product->identification
                                                                            )
                                                                     );?>">
                                <span class="item_title"><?=$o_product->subject;?></span><br/>
                            </a>

                            <div class="position_relative">
                                <span class="item_sub_title"><?=$o_product->price;?></span>
                            </div>

                            <div class="butt_icon">
                                <a 
                                    title    = "Đăng lên ZingMe"
                                    target    = "_blank"
                                    href    = "http://link.apps.zing.vn/pro/view/conn/share?u="
                                >
                                    <span class="icon_social_network icon_zingme"></span>
                                </a>

                                <span class="icon_social_network icon_govn"></span>
                                <span class="icon_social_network icon_facebook" onclick="facebook_sharing('');"></span>

                            </div>
                        </div><!-- End item_content -->
                    </div> <!-- End item_vertical -->
                <?php
                        $itemp ++;
                        if($itemp == 4)
                        {
                            echo "<div class='clear'></div>";
                            $itemp = 0;
                        }
                    }
                } ?>
            </div><!-- End galleries_item -->
    
        </div><!-- End box_710 -->
    <?php
        }
    }
    ?>
</div><!-- End class grid_712 -->